home *** CD-ROM | disk | FTP | other *** search
- /*
- * alarm: a public domain alarm for MiNT (by ers)
- */
-
- #include <errno.h>
- #include <mintbind.h>
- #include <limits.h>
- #include <unistd.h>
-
- extern int __mint;
-
- unsigned int
- alarm(secs)
- unsigned secs;
- {
- long r;
-
- if (__mint == 0)
- return 0;
- #ifndef __MSHORT__
- if (secs > ((unsigned int) (LONG_MAX/1000)))
- secs = ((unsigned int) (LONG_MAX/1000));
- #endif
- r = Talarm((long) secs);
-
- return (unsigned int) r;
- }
-